<template>
    <!--  <div style="height: 50px; line-height: 50px; border-bottom: 1px solid #ccc; display: flex">-->
    <div style="height: 60px; line-height: 60px; border-bottom: 1px solid #2f3447;background-color:#2f3447;display: flex">
        <!--    <div id="title" style="width: 200px; padding-left: 30px; font-weight: bold; color: dodgerblue">疫苗接种管理系统</div>-->
        <img src="../images/vaccine.png" alt="" style="margin-left: 5px">
        <div id="title">疫苗接种管理系统</div>
        <div style="flex: 1"></div>
        <div style="width: 100px">
            <el-dropdown>
        <span class="el-dropdown-link">
          <el-avatar :size="30" :src="user.avatar" style="position: relative; top: 10px;"></el-avatar>
          <span style="color: white">{{ user.nickName }}</span>
          <i class="el-icon-arrow-down el-icon--right"></i>
        </span>
                <template #dropdown>
                    <el-dropdown-menu>
                        <el-dropdown-item @click="$router.push('/person')">个人信息</el-dropdown-item>
                        <el-dropdown-item @click="$router.push('/login')">退出系统</el-dropdown-item>
                    </el-dropdown-menu>
                </template>
            </el-dropdown>
        </div>
    </div>
</template>

<script>
    export default {
        name: "Header",
        props: ['user'],
        data() {
            return {}
        },
        created() {
        }
    }
</script>

<style scoped>
    #title {
        display: inline-block;
        overflow: hidden;
        font-size: 20px;
        line-height: 55px;
        color: #fff;
        text-overflow: ellipsis;
        white-space: nowrap;
        vertical-align: middle;
        max-width: calc(256px - 60px);
    }
</style>
